<template>
	<view class="content">
		<image class="logo" src="/static/logo.png"></image>
		<view class="text-area s-flex-r-b-c">
			<text class="title s-fs10">{{title}}</text>
			<text class="iconfont icon-cart"></text>
		</view>
		<view class="s-flex-r-b-c">
			<u-button text="月落"></u-button>
			<u-button text="月落"></u-button>
		</view>
	</view>
</template>

<script>
	import {
		useStore
	} from 'vuex'

	export default {
		data() {
			return {
				title: 'Hello'
			}
		},
		onLoad() {
			const store = useStore();
			console.log(store.getters.GET_USERINFO, 11);
			this.setUserInfo();
			console.log(store.getters.GET_USERINFO, 11);
		},
		methods: {
			setUserInfo() {
				const store = useStore();
				store.dispatch('DIS_SET_USERINFO', '里斯2')
				// store.commit('SET_USERINFO', '里斯')
			}
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>